<template>
	<div class="search">
		<Input v-model="value13">
		<Button slot="append" icon="ios-search" @click="search()"></Button>
		</Input>
		<div style="margin: 20px;">
			<!-- <Row type="flex" justify="space-between" class="code-row-bg" style="text-align: center;">
				<Col span="3">热门职业:</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
				<Col span="3">col-4</Col>
			</Row> -->
		</div>
		<!-- 		<List header="相关招聘" border size="large">
			<ListItem v-for="(item, i) in list">
				<ListItemMeta :title="item.position" />
				<template slot="action">
					<li>
						<a href="">{{item.pubdate}}</a>
					</li>
				</template>
			</ListItem>
		</List> -->
		<Table :columns="columns" :data="list" @on-row-click="to" style="cursor: pointer;">
			<template slot="empty">
				<!-- <img class="data-pic" src="#" alt="" /> -->
				<p>暂无数据</p>
			</template>
		</Table>

	</div>
</template>

<script lang="ts">
	export default {
		data() {
			return {
				columns: [{
						title: '职位名',
						key: 'position'
					},
					{
						title: '公司',
						key: 'company',
						width: 290
					},
					{
						title: '薪水',
						key: 'pay',
						width: 180
					},
					{
						title: '地区',
						key: 'adress',
						width: 120
					},
					{
						title: '发布时间',
						key: 'pubdate',
						sortable: true,
						width: 140
					}
				],
				value13: '',
				value2: 0,
				list: []
			}
		},
		methods: {
			search() {
				let params = {
					key: this.value13,
				};
				// console.log(this.value13);
				// this.$Message.info(this.value13);
				this.http.get('/findByKey', params).then((res) => {
					console.log(res);
					let data = res.data.data;
					this.list = data;


				}).catch((err) => {
					console.log('failed', err);
				});
			},
			to(data) {
				window.open(data.url);
				// window.location.href = data.url;

			}
		},
		mounted() {

		}

	}
</script>
<style scoped="scoped">
	.search {
		width: 75%;
		margin: auto;
	}

	.card_price {
		float: right;
		color: #f5070799;
		margin-right: 20px;

	}
</style>
